#ifndef _CENEMY_
#define _CENEMY_
#include <vector>
using namespace std;

#include "CBase.h"
#include "IListener.h"
#include "CPhysics.h"

enum EnemyType{ENE_GUARD, ENE_WARDEN, ENE_MAX};

class CBaseAIState;
class CEnemy : public CBase, public IListener
{
	vector<CBaseAIState*> m_vAIStates;

	int m_nHP;
	int m_nMaxHP;
	bool m_bVulnerable;

	CPhysics m_enemyPhysics;

	int	m_nCurrentAI;
protected:
	int m_nType;
public:
	CEnemy();
	~CEnemy();
	void Update(float fElapsedTime);
	bool CheckCollision( CBase* pBase );

	void SetEnemyType(int nType) {m_nType = nType;}
	int GetEnemyType(){ return m_nType; }

	void LoadAI(CBaseAIState* pAIState){m_vAIStates.push_back(pAIState);}
	void SetCurrentAI(int nAI_ID);

	RECT GetCollisionRect();
	void HandleEvents( CEvents* pEvent );

	int GetHP(){return m_nHP;}
	int GetMaxHP(){return m_nMaxHP;}

	void SetHP(int nHP){m_nHP = nHP;}
	void SetMaxHP(int nMaxHP){m_nMaxHP = nMaxHP;}

	bool GetVulnerable(){return m_bVulnerable;}
	void SetVulnerable(bool bVulnerable){ m_bVulnerable = bVulnerable;}

	void Render();
};

#endif